<template>
  <div class="dashboard-container">
    <h1>欢迎登录智能控制课题组文献管理平台</h1>
    <p style="font-size: 20px">用户信息</p>
    <div class="dashboard-text" v-text="getUserRealName()"></div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import cookie from 'js-cookie'

export default {
  data() {
    return {
      user: {
        realName: ''
      }
    }
  },
  created() {

  },


  methods: {
    getUserRealName() {
      let user = JSON.parse(cookie.get("user-info"))
      return '姓名：'+user.realName
    }
  },
  name: 'dashboard',
  computed: {
    ...mapGetters([
      'name',
      'roles'
    ])
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
